<?php if (!defined('THINK_PATH')) exit();?>﻿<!DOCTYPE html>
<html>

	<head>
		<title>
			结果
		</title>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0,user-scalable=no">
		<meta name="mobileOptimized" content="width">
		<meta name="handheldFriendly" content="true">
		<meta http-equiv="Cache-Control" content="max-age=0">
		<meta name="apple-touch-fullscreen" content="yes">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">

		<link rel="stylesheet" href="/test/thinkphp_3.2.3_full/Public/css/style.css" media="screen" type="text/css" />
		<link rel="stylesheet" href="/test/thinkphp_3.2.3_full/Public/css/my.css" />
		<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">
		<script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
		<script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
		<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
		
        <script type="text/javascript" src="/test/thinkphp_3.2.3_full/Public/js/jquery-1.2.6.min.js"></script> 
		<script src="/test/thinkphp_3.2.3_full/Public/js/snowfall.jquery.js"></script>

		<script>
			wx.config({
				debug: false,
				appId: 'wx9530539921dbc2d7',
				timestamp: '<?php echo ($timestamp); ?>',
				nonceStr: '<?php echo ($wxnonceStr); ?>',
				signature: '<?php echo ($wxSha1); ?>',
				jsApiList: [
					'onMenuShareTimeline',
					'onMenuShareAppMessage',
					'onMenuShareQQ',
					'onMenuShareWeibo',
					'onMenuShareQZone',
					'hideMenuItems'
				]
			});
			wx.ready(function() {
				wx.hideMenuItems({
					menuList: [
						'menuItem:share:qq', "menuItem:share:weiboApp", "menuItem:favorite", "menuItem:share:facebook", "menuItem:readMode", "menuItem:openWithSafari", "menuItem:copyUrl", "menuItem:exposeArticle"
					],
					success: function(res) {},
					fail: function(res) {
						alert(JSON.stringify(res));
					}
				});
				wx.onMenuShareAppMessage({
					title: '中秋游戏吃月饼大赛', // 分享标题
					desc: '请帮我吃月饼', // 分享描述
					link: 'http://www.selletu.com/test/thinkphp_3.2.3_full/index.php/Home/Zqgame/index/openid/' + '<?php echo ($myopenid); ?>' + '/action/help.html', // 分享链接
					imgUrl: "http://www.selletu.com"+'/test/thinkphp_3.2.3_full/Public/images/fengmian.png', // 分享图标
					type: 'link', // 分享类型,music、video或link，不填默认为link
					dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
					success: function() {
						// 用户确认分享后执行的回调函数
					},
					cancel: function() {
						// 用户取消分享后执行的回调函数
					}
				});
				wx.onMenuShareTimeline({
					title: '中秋游戏吃月饼大赛', // 分享标题
					desc: '请帮我吃月饼', // 分享描述
					link: 'http://www.selletu.com/test/thinkphp_3.2.3_full/index.php/Home/Zqgame/index/openid/' + '<?php echo ($myopenid); ?>' + '/action/help.html', // 分享链接
					imgUrl: "http://www.selletu.com"+'/test/thinkphp_3.2.3_full/Public/images/fengmian.png', // 分享图标
					type: 'link', // 分享类型,music、video或link，不填默认为link
					dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
					success: function() {
						// 用户确认分享后执行的回调函数
					},
					cancel: function() {
						// 用户取消分享后执行的回调函数
					}
				});
				trg
			});
		</script>

		<script type="text/javascript">
			$(document).ready(function() {
				$('.skillbar').each(function() {
					$(this).find('.skillbar-bar').animate({
						width: $(this).attr('data-percent')
					}, 3000);
				});
				$("#show").click(function() {
					$('html, body').animate({scrollTop:0}, 'slow');
					$("#share-wx").show();
				});
				$("#share-wx").click(function() {
					$(this).hide();
				});
				$("#share-wx").height(document.body.scrollHeight);
			});
		</script>
	</head>

	<body id="body" style="margin:0 auto;">
	
	<script>
		
			
				$(document).snowfall('clear');
				$(document).snowfall({
				image: "/test/thinkphp_3.2.3_full/Public/images/huaban.png",
				flakeCount: 30,
				minSize: 5,
				maxSize: 22
			});
				
				$(window.document).scroll(function () {
                $(document).snowfall('clear');
                $(document).snowfall({
				image: "/test/thinkphp_3.2.3_full/Public/images/huaban.png",
				flakeCount: 30,
				minSize: 5,
				maxSize: 22
			});
            });
				
		</script>
		
		<div id="share-wx" class="share" style="position: absolute;width: 100%;
  height: 100%;top: 0;right:0;z-index: 999;-webkit-user-select: none;background:#222222;-moz-opacity:0.8;opacity:0.8;">
			<P style="text-align: right;">
				<img id="share-wx-img" style="max-width: 100%;" src="/test/thinkphp_3.2.3_full/Public/images/2000.png">
			</P>
		</div>
		<section>
			<div class="header">
				<img src="/test/thinkphp_3.2.3_full/Public/images/headding.png">

			</div>
			<div class="liebiao">
				<p class="yun">
					<img src="/test/thinkphp_3.2.3_full/Public/images/yun.png">
				</p>
				<div class="touxiang">
					<ul class="list_ul">
						<?php if(is_array($records)): $i = 0; $__LIST__ = $records;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><li>
								<div class="pq1"><?php echo ($vo["zname"]); ?>
									<div class="pq"><img src="<?php echo ($vo["zimageurl"]); ?>"></div>
									<a class="pq2" style="margin-left:60px;">帮你吃了<?php echo ($vo["number"]); ?>个月饼</a>
								</div>

							</li><?php endforeach; endif; else: echo "" ;endif; ?>

					</ul>
				</div>
				<div class="biaokuang" style="margin-top: 120px;">
					<p class="bk_words">剩余月饼个数<?php echo ($userinfo[rest]); ?></p>
					<div class="skillbar clearfix " data-percent="<?php echo ($userinfo[percent]); ?>">
						<div class="skillbar-bar" style="background: #4288d0;"></div>
						<div class="skill-bar-percent">完成度<?php echo ($userinfo[percent]); ?></div>
					</div>
					<!-- End Skill Bar -->
				</div>
				
				<?php if($userinfo["rest"] > 0): ?><div class="btn0" style="width:50%;margin:0 auto;">
						<button id="show" type="button" class="btn btn-primary" style="width:100%;
							background:#FFF;border-color: rgba(3, 1, 15, 0.5);margin:0 auto;text-align:center;">
							<span>邀请好友</span>
						</button>
					</div>
					<?php if($userinfo["isplayed"] == 0): ?><div class="btn2" style="width:50%;margin:0 auto;">
							<button type="button" class="btn btn-primary" style="width:100%;background:#FFF;border-color: rgba(3, 1, 15, 0.5);">
								<a href="<?php echo U('Zqgame/index',array(" openid "=>$userinfo[openid]));?>">开始游戏</a>
							</button>
						</div><?php endif; ?>
					
					<?php else: ?>
					<?php if($userinfo["lottery"] == 0): ?><div class="btn2" style="width:50%;margin:0 auto;">
							<button type="button" class="btn btn-primary" style="width:100%;background:#FFF;border-color: rgba(3, 1, 15, 0.5);">
								<a href="<?php echo U('Lottery/index',array(" openid "=>$userinfo[openid]));?>">立即抽奖</a>
							</button>
						</div><?php endif; endif; ?>
				<div class="btn2" style="text-align: center;color:#F0FFFF">
								<label>个人中奖记录: <?php echo ($userinfo["jiangpin"]); echo ($userinfo["lotterytime"]); ?></label>
		
						</div>
				
				<marquee height="100" scrollamount="3" behavior="scroll" direction="up" style="text-align: center;margin-top: 20px;text-decoration: none;">
				<?php if(is_array($lotterymsg)): $i = 0; $__LIST__ = $lotterymsg;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><div style="color:wheat;"><?php echo ($vo["name"]); ?> | <?php echo ($vo["jiangpin"]); ?> | <?php echo ($vo["lotterytime"]); ?></div><?php endforeach; endif; else: echo "" ;endif; ?>
				</marquee>
				
				<div class="footers">
					<img src="/test/thinkphp_3.2.3_full/Public/images/di_bg.png">
				</div>
			</div>
		</section>
		</div>
	</body>

</html>